package com.yl.controller;


import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yl.model.OrderDetails;
import com.yl.service.IOrderDetailsService;


@ResponseBody
@Controller
public class OrderDetailsController {

	@Resource
	private IOrderDetailsService orderDetailsService;
	
			//后台查看订单详情
			@RequestMapping("/findOrderDetail.do")
			@ResponseBody
			public Map findByOID(int orders_id) {
				return orderDetailsService.findByOID(orders_id);
			}
	
			//前台添加订单详情
			@RequestMapping("/addOrderDetail.do")
			@ResponseBody
			public int addOrderDetail(OrderDetails od) {
				
				System.out.println(od.getOrders_id());
				return orderDetailsService.addOrderDetail(od);
			}
			
}
